package models

import (
	__ "ew-srv/basic/proto"
	"gorm.io/gorm"
)

type HomePages struct {
	gorm.Model
	Title    string `gorm:"type:varchar(20);not null;comment:'课程标题'"`
	Image    string `gorm:"type:varchar(290);not null;comment:'课程封面'"`
	Content  string `gorm:"type:varchar(290);not null;comment:'首页内容'"`
	VideoNum int    `gorm:"type:int;comment:'视频集数'"`
	HomeType int    `gorm:"type:int;comment:'首页分类 1 建筑 2 家具 3 桌椅'"`
}

func (h *HomePages) GetHomePageList(db *gorm.DB) (List []*__.EHomePageList, err error) {
	err = db.Model(&HomePages{}).Find(&List).Error
	return
}
